<?xml version="1.0" encoding="UTF-8"?><d:tdl xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.backbase.com/2006/btl"  xmlns:d="http://www.backbase.com/2006/tdl" >

	<d:namespace name="http://www.backbase.com/2006/btl">

		<d:uses element="positionElement dimensionElement" src="../visualElement/visualElement.xml"/>

		<d:element name="applet" extends="b:positionElement b:dimensionElement">
			

			<d:template type="text/javascript">
				var sName 	= this.getAttribute('name');
				var sAlign 	= this.getAttribute('align');
				var sHeight	= this.getAttribute('height');
				this._._height = sHeight;
				var sWidth 	= this.getAttribute('width');
				var sCommonAttr = ' height="' + sHeight + '" width="' + sWidth + '" align="' + sAlign + '" name="' + sName + '"';

				var oParams = {};
				var sName, sCode;
				var aChildren = this.modelNode.childNodes;
				for(var i = 0, iLimit = aChildren.length; i &lt; iLimit; i++){
					if(aChildren[i].nodeType == 1 &amp;&amp; (aChildren[i].getAttribute('value') &amp;&amp; aChildren[i].getAttribute('name'))){
						if((sName = aChildren[i].getAttribute('name')) != "code")
							oParams[sName] = aChildren[i].getAttribute('value');
						else
							sCode = aChildren[i].getAttribute('value');
					}
				}

				var sApplet = (bb.browser.webkit?'&lt;applet':'&lt;object') + ' code="' + sCode + '"';
				sApplet += sCommonAttr;
				sApplet += '&gt;';

				var sEmbedAttr = '';
				for(var paramName in oParams) {
						sApplet += '&lt;param name="' + paramName + '" value="' + oParams[paramName] + '"&gt;&lt;/param&gt;';
						sEmbedAttr += paramName + '="' + oParams[paramName] + '" ';
				}
				sEmbedAttr += 'code = "' + sCode + '" ';

				if(!bb.browser.webkit) {
					sApplet +='&lt;comment&gt;&lt;embed type="application/x-java-applet" pluginspage="http://java.sun.com/j2se/1.5.0/download.html" ';
					sApplet += sCommonAttr + sEmbedAttr + '&gt;';
					sApplet += '&lt;/embed&gt;&lt;/comment&gt;';
					sApplet += '&lt;/object&gt;';
				} else {
					sApplet += '&lt;/applet&gt;';
				}

				var oObj = bb.html.createElementFromString(sApplet);
				var oSpan = document.createElement('span');
				oSpan.style.display = 'none';
				try{
					oObj.insertBefore(oSpan, oObj.lastChild);
				}catch(e){}
				return [oObj, oSpan];
			</d:template>

			<d:method name="__children">
				
				<d:body type="text/javascript"><![CDATA[
					// do not process children, it's just data
				]]></d:body>
			</d:method>

			<d:attribute name="height">
				<!-- Empty mapper to overwrite the implementation of dimensionElement. -->
				<d:mapper type="text/javascript"/>
				<d:changer type="text/javascript"><![CDATA[
					this.setProperty(name, value);
				]]></d:changer>
			</d:attribute>

			<d:attribute name="width">
				<d:changer type="text/javascript"><![CDATA[
					this.viewNode.width = value;
					if(this.viewNode.lastChild) this.viewNode.lastChild.style.width = value;
				]]></d:changer>
			</d:attribute>

			<d:attribute name="align">
				
				<d:changer type="text/javascript"><![CDATA[
					this.viewNode.align = value;
					if(this.viewNode.lastChild) this.viewNode.lastChild.style.align = value;
				]]></d:changer>
			</d:attribute>

			<d:property name="height">
				<d:setter type="text/javascript"><![CDATA[
					this.viewNode.height = value;
					if (this.viewNode.lastChild)
						this.viewNode.lastChild.style.height = value;
					// XXX: this.viewNode.lastChild.style.height = value; does not work in FF 3, what about other browsers?
					// use lastChild.firstChild.style instead?
					this._._height = value;
				]]></d:setter>
			</d:property>
		</d:element>

		<d:element name="appletParam" extends="b:element">
			

			<d:attribute name="name">
				
			</d:attribute>

			<d:attribute name="value">
				
			</d:attribute>
		</d:element>
	</d:namespace>
</d:tdl>